//#include "PhotonMapping.h"
//
//PhotonMap::PhotonMap()
//{
//	m_NumGlobalPhotons = 0;
//	m_Globalphoton	= NULL;
//}
//
//PhotonMap::~PhotonMap()
//{
//	if (m_Globalphoton != NULL)
//		delete[]	m_Globalphoton;
//	m_Globalphoton = NULL;
//}
//
//#define  PHOTON_REALLOC_JUMP	1000
//
//void PhotonMap::AddToPhotonList(Photon **pList, long *lCount, Photon tPhoton)
//{
//	int cnt = 0;
//	if ( (*lCount % PHOTON_REALLOC_JUMP) == 0)
//	{
//		cnt = ((*lCount/PHOTON_REALLOC_JUMP) + 1) * PHOTON_REALLOC_JUMP;
//		*pList = (Photon*)realloc(*pList, sizeof(Photon) * cnt);	
//	}
//	(*pList)[(*lCount)++] = tPhoton;
//}
//
//void Create_Photons_For_Light( Light* light)
//{
//	int		nShot = 0,	nHit = 0;
//	float	x, y, z;
//	Ray		ray;
//	Vec3f	vHit, vNormal;
//	int		ClosestObject;
//
//	// shoot random directions
//	while ( nShot < max_photons)
//	{
//		do 
//		{ 
//			x = (-1 + 2*(float)rand() / (float)RAND_MAX);
//			y = (-1 + 2*(float)rand() / (float)RAND_MAX);
//			z = (-1 + 2*(float)rand() / (float)RAND_MAX);
//
//		} while ((x*x + y*y + z*z) > 1);
//		//set up ray (light -> random dir)
//		ray.origin = light->
//	}
//}
